import request from '@/utils/request'

// 查询考试列表
export function listExamiton(query) {
  return request({
    url: '/exam/examination/listExamByTeacher',
    method: 'get',
    params: query
  })
}
//查询场次下的学生
export function liststu(params) {
  return request({
    url: '/exam/examinee/getBySessionId',
    method: 'get',
    params: params
  })
}
//查询场次下成绩
export function listexportStu(query) {
  return request({
    url: '/exam/session/exportStu',
    method: 'get',
    params: query
  })
}
//查询场次下试卷
export function listexportPaper(query) {
  return request({
    url: '/paper/paper/downloadPaper/' + query.sessionId,
    method: 'get',
    timeout: 60000
    // params: query
  })
}


// 查询试卷详情
export function listDetail(data) {
  return request({
    url: '/exam/examinee/queryPaper',
    method: 'post',
    data: data
  })
}

// 实时查看考生试卷
export function listQueryExam(data) {
  return request({
    url: '/exam/examinee/queryExam',
    method: 'post',
    data: data
  })
}
// 退出
export function exitExam(data) {
  return request({
    url: '/exam/examinee/reviewPaper',
    method: 'post',
    data: data
  })
}

export function batchReview(data) {
  return request({
    url: '/paper/paper/reviewBySessionId',
    method: 'post',
    data: data
  })
}

// 下载单个试题
export function downLoadOneExam(id) {
  return request({
    url: '/paper/paper/downloadPaperByStu/' + id,
    method: 'get'
  })
}
